function Tank(control){
	this.control = control;
}
Tank.prototype={
	width:50,
	height:50,
	picture:{img:null,x:0,y:0},
	init:function(){
		if(this.picture.img){
			return ;
		}
		var img = new Image();
		img.src = "img/tanke.png";	
		this.picture.img = img;
	},
	//画出自己
	drawSelf:function(){
		this.init()
		this.move();
		var imgSprite={x:0,y:0};
		var direction = this.control.getDirection();
		switch(direction){
			 case Control.DIR_UP:
		    	imgSprite.x=150;
		    	 break
		  	 case Control.DIR_RIGHT:
		    	imgSprite.x=100;
		    	 break
			 case Control.DIR_DOWN:
		    	imgSprite.x=0;
		    	 break
		  	 case Control.DIR_LEFT :
		    	imgSprite.x=50;
		    	 break
		  	 default:
		}
		
		canvasInfo.ctx.drawImage(this.picture.img, imgSprite.x, imgSprite.y, this.width, this.height, this.control.movement.x, this.control.movement.y,
				this.width, this.height);
	},
	move:function(){
		this.control.dispose();
	}
}